package voxietest1.jam;

import processing.core.PApplet;
import voxbox.wrapper.VoxiScene;
import voxietest1.ParticleSystem;

public class ParticleVoxieScene extends VoxiScene {
	public double time = 0;
	public ParticleVoxieScene() {}

	ParticleSystem ps = new ParticleSystem(1.0f);
	
	@Override
	public void mySetup() {
		ps.MakeBurst(1,1,1,100);
	}

	@Override
	public void myUpdate() {
		ps.myUpdate();
	}
	
	@Override
	public void myDraw() {
		ps.myDraw();
		time += deltaTime;
		float r = .2f*(float)Math.sin(time);
		float r2 = .2f*(float)Math.sin(time+Math.PI/2);
		float r3 = 0;
		
		//voxi.voxi_drawsph(frame, 0, 0, 0, r, r,  7);
		voxi.voxi_drawbox(frame, -.2f + r, -.2f-.5f, -.2f, .2f + r, .2f-.5f, .2f,  2,  7);
		voxi.voxi_drawbox(frame, -.2f + r2, -.2f, -.2f, .2f + r2, .2f, .2f,  2,  7);
		voxi.voxi_drawbox(frame, -.2f + r3, -.2f+.5f, -.2f, .2f + r3, .2f+.5f, .2f,  2,  7);
	}

}
